package com.zbl.zblproject.core.entity;


/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/12/13
 */
public enum OrderStatus {

    //0:未销售 1:部分销售 2:已完成 3.已终结
    notSold(0, "未销售"),
    partialSales(1, "部分销售"),
    completed(2, "已完成"),
    ended(3, "已终结");


    private int status;

    private String name;

    public static OrderStatus valueOf(int value){
        switch(value){
            case 0:
                return notSold;
            case 1:
                return partialSales;
            case 2:
                return completed;
            case 3:
                return ended;
            default:
                throw new RuntimeException("没有这个状态节点!");
        }
    }

    OrderStatus(int status, String name){
        this.status = status;
        this.name = name;
    }


    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


}
